<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>自定义Spring Security登录页面</title>
    <link rel="stylesheet" type="text/css" href="/css/test.css">
    <script type="text/javascript" src="/js/test.js"></script>
</head>
<body>
<div style="width: 500px; margin: auto; text-align: center;">
    <!--  Spring Security登录接口默认是/login，可以修改，但请求方式一定是post-->
    <form action="/user/login" method="post">
        <span th:if="${loginFail} == 'T'" style="color: red;">用户名或密码错误</span>
        <table border="1" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td style="width: 30%; text-align: right;padding-right: 5px;">
                    用户名：
                </td>
                <td style="padding-left: 5px; text-align: left;">
                    <input name="name" type="text">
                </td>
            </tr>
            <tr>
                <td style="width: 30%; text-align: right; padding-right: 5px;">
                    密码：
                </td>
                <td style="padding-left: 5px; text-align: left;">
                    <input name="pswd" type="password">
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                    <input type="submit" value="登录">
                </td>
            </tr>
        </table>
    </form>
    <a href="/h2-console" target="_blank">数据库控制台</a>
</div>

</body>
</html>